from django.test import TestCase
from datetime import datetime


class TestInject(TestCase):
    def __init__(self, methodName: str = "runTest") -> None:
        super().__init__(methodName)

    def test_getgroundtruth(self):
        url = "/getgroundtruth"

        response = self.client.get(
            url,
            data={
                "start_time": int(
                    datetime.strptime(
                        "2024-05-12 00:00:00", "%Y-%m-%d %H:%M:%S"
                    ).timestamp()
                ),
                "end_time": int(
                    datetime.strptime(
                        "2024-05-13 00:00:00", "%Y-%m-%d %H:%M:%S"
                    ).timestamp()
                ),
            },
        )
        self.assertEqual(200, response.status_code)
